package cn.exrick.xboot.securityAdvisor.controllerImpl

import cn.exrick.xboot.base.entity.SecurityAdvisorJobTrainPart
import cn.exrick.xboot.base.service.ISecurityAdvisorJobTrainPartService
import cn.exrick.xboot.base.vo.SecurityAdvisorJobTrainPartVo
import cn.exrick.xboot.core.common.vo.PageVo
import cn.exrick.xboot.core.common.vo.Result
import cn.exrick.xboot.securityAdvisor.controller.ISecurityAdvisorController
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.RestController

@RestController
open class SecurityAdvisorJobTrainPartController : ISecurityAdvisorController.SecurityAdvisorJobTrainPart {

    @Autowired
    private lateinit var iSecurityAdvisorJobTrainPartService: ISecurityAdvisorJobTrainPartService

    override fun createOrUpdateTrainPart(securityAdvisorJobTrainPart: SecurityAdvisorJobTrainPart): Result<Any?>? {

        return iSecurityAdvisorJobTrainPartService.createOrUpdateTrainPart(securityAdvisorJobTrainPart)
    }

    override fun removeTrainPart(ids: Array<out String>): Result<Any?>? {

        return iSecurityAdvisorJobTrainPartService.removeTrainPart(ids)
    }

    override fun getTrainPartDetail(id: String?): Result<SecurityAdvisorJobTrainPartVo?>? {

        return iSecurityAdvisorJobTrainPartService.getTrainPartDetail(id)
    }


    override fun getTrainPartList(pageVo: PageVo, jobTrainId: String): Result<MutableMap<String, Any?>>? {

        return iSecurityAdvisorJobTrainPartService.getTrainPartList(pageVo, jobTrainId)
    }
}